﻿<UserControl x:Class="Zen4SyncDashboard.View.MergeSyncContextView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="800">
    <DockPanel x:Name="dockPanel" LastChildFill="True">
        <Label Content="Merge Synchronization Contexts" Style="{StaticResource ViewTitle}" DockPanel.Dock="Top"/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="7*"/>
                <ColumnDefinition Width="3*"/>
            </Grid.ColumnDefinitions>
            <ListBox ItemsSource="{Binding SyncSessionContexts}" DisplayMemberPath="syncSessionContext_name">
                <!--<ListBox.ItemStringFormat>
                    <MultiBinding StringFormat="{}{Context {0} / Subscriber {1}}">
                        <Binding Path="syncSessionContext_name"/>
                        <Binding Path="subscriber.subscriber_name"/>
                    </MultiBinding>
                </ListBox.ItemStringFormat>-->
            </ListBox>
            <GroupBox Header="New" Grid.Column="1">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="4*" />
                        <ColumnDefinition Width="6*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Label Content="Context Name"/>
                    <Label Content="Subscriber Name" Grid.Row="1"/>
                    <Label Content="Subscriber Hostname" Grid.Row="2"/>
                    <Label Content="Connection String" Grid.Row="3"/>
                    <Label Content="Delete SDF file" Grid.Row="4"/>
                    <Label Content="SDF File Name" Grid.Row="5"/>
                    <Label Content="SDF File Directory" Grid.Row="6"/>
                    <Label Content="Reinitialize Subscription" Grid.Row="7"/>
                    <Label Content="Upload Before Reinitialize" Grid.Row="8"/>
                    <Label Content="Validate Type" Grid.Row="9"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="0" Text="{Binding Path=NewSyncSessionContext.syncSessionContext_name, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="1" Text="{Binding Path=NewSubscriber.subscriber_name, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="2" Text="{Binding Path=NewSubscriber.subscriber_hostName, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="3" Text="{Binding Path=NewSubscriber.subscriber_connectionString, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="4" Text="{Binding Path=NewSubscriber.subscriber_deleteSdfIfItExists, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="5" Text="{Binding Path=NewSubscriber.subscriber_sdfFileName, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="6" Text="{Binding Path=NewSubscriber.subscriber_sdfFileDirectory, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="7" Text="{Binding Path=NewSubscriber.subscriber_reinitializeSubscription, ValidatesOnDataErrors=True}"/>
                    <TextBox Style="{StaticResource NewTextBoxStyle}" Grid.Column="1" Grid.Row="8" Text="{Binding Path=NewSubscriber.subscriber_uploadBeforeReinitialize, ValidatesOnDataErrors=True}"/>
                    <ComboBox Style="{StaticResource NewComboBoxStyle}" Grid.Column="1" Grid.Row="9" ItemsSource="{Binding Path=ValidateTypes}" DisplayMemberPath="validateType_name" SelectedItem="{Binding Path=NewSubscriber.validateType, ValidatesOnDataErrors=True}"/>
                    <Button Content="Add" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource AddButtonStyle}" Command="{Binding AddNewSyncSessionContextCommand}"/>
                </Grid>
            </GroupBox>
        </Grid>
    </DockPanel>
</UserControl>
